import { Component, OnInit, Input, HostBinding } from "@angular/core";

@Component({
  selector: "app-icon-arrow",
  templateUrl: "./icon-arrow.component.html",
  styleUrls: ["./icon-arrow.component.scss"]
})
export class IconArrowComponent implements OnInit {
  @Input() tstyle: any;
  @Input() turn: string;
  @Input() on: string;
  get fill() {
    if (this.on) {
      return "#5693FF";
    }
    if (this.tstyle.fill) {
      return this.tstyle.fill;
    }
    if (this.turn === "up") {
      return "green";
    }
    if (this.turn === "down") {
      return "#5693FF";
    }
  }
  get transform() {
    if (this.turn === "up") {
      return "rotate(180deg)";
    }
    if (this.turn === "down") {
      return "rotate(0deg)";
    }
    if (this.turn === "left") {
      return "rotate(90deg)";
    }
    if (this.turn === "right") {
      return "rotate(-90deg)";
    }
  }

  constructor() {}

  ngOnInit() {}
}
